home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 1992 August / info-mac-1992.iso / Control Panel (cp) / Menu Icons MICN / MICN Docs < prev   
Text File  |  1991-07-15  |  5KB  |  46 lines

  1. MICN 1.0 - Display small iconic representation for menu titles.
  2.  
  3. This hack is an implementation of an idea suggested by USENET readers* as a method for reclaiming menu bar space.  It has no real interface, but it is configurable (with ResEdit).
  4.  
  5. MICN comes preconfigured to display SICNs for the following menu titles:  File, Edit, Font, Help, Window(s).  If you want to add more SICNs, remove the standard ones, or otherwise customize MICN, you will need ResEdit or a similar resource editor.
  6.  
  7. ____ MICN Lists ____
  8. MICN uses a special resource/data structure, called a MICN list, to determine which menu titles it replaces with icons.  MICN lists may be edited with ResEdit by double-clicking on the appropriate MICN resource (a resource template (TMPL) is provided to make editing easier).  The format of a MICN list is loosely comparable to this Pascal record structure:
  9.  
  10. MICNList = array [1..n] of record
  11.     title: string;
  12.     width: integer;
  13.     index: integer;
  14.     resID: integer;
  15.     filler: integer
  16. end;
  17.  
  18. title: the title of the menu to replace (e.g. "File" or "Edit")
  19. width: the width of the SICN in pixels (0 defaults to 16)
  20. index: index within the SICN resource of this menu's icon
  21. resID: resource ID number of the SICN resource that contains this menu's icon.
  22. filler: I need this space internally (you won't see it in the TMPL).
  23.  
  24. (Note that the last four fields are packed against the string on word boundary.)
  25.  
  26. ____ SICN resources ____
  27. MICN displays a SICN resource for the menu titles it is told to iconify.  This is a standard resource type that can be created and edited using ResEdit.  Each menu title has two icons within it's SICN resource: enabled and disabled.  The "index" field of a MICN list refers to the index of the enabled icon, and the disabled icon follows immediately afterwards.  For this reason, "index" will usually be even, and every SICN resource will have an even number of icons.
  28.  
  29. ____ Global MICN list ____
  30. MICN maintains a "Global" MICN list, which it uses to replace menu titles in ALL open applications.  This list is kept in MICN's resource fork and must be MICN=128 (res type is MICN, res id is #128).  This list is consulted FIRST when determining whether or not to iconify a menu title.  If you make any changes, you must reboot for them to take effect.
  31.  
  32. ____ Application MICN lists ____
  33. Each application can have its own private MICN list, and associated SICNs.  To give an app a private list, merely add a resource of type MICN, id #128, to the app's resource fork, fill it with appropriate values, and also create the associated SICN resource(s).  An application's MICN list is consulted AFTER the global MICN list.  It will be used as soon as you open the application; you needn't reboot.
  34.  
  35. ____ (In)compatabilities, bugs, and other foo ____
  36. Although I haven't encountered any incompatabilities yet, I'm sure they exist.  I have tested on A Mac 512Ke, Plus, II, and IIci, under System 6.0.5 and 7.0.  And the biggest test of all... it works with Microsoft products! :-)  I haven't used any traps from beyond IM II (except NSet/NGetTrapAddress, which do not matter), so I don't expect too many version problems.  Found a bug?  Send e-mail to me at:  kurash@gile.dartmouth.edu
  37.  
  38. One might conclude that MICN impinges on the speed of your Mac.  To a certain extent, this is true (it has to do something!).  However, if you keep the global MICN list relatively small, and put specialized stuff where it belongs (in applications' private MICN lists), then you shouldn't notice anything.
  39.  
  40. Actually, there is an interface to MICN (a Control Panel), but all it does is turn MICN on and off.  I don't use this feature much, and it's not perfect, so I am not distributing it with this release.  If there are enough people interested, and if I can get a feeling for what needs to be in this interface (other than on/off), I might include it next time around.  Ideas:  a scrolling list of SICNs to add/delete to various MICNs, as well as a way to add new menu titles;  an app-by-app override switch (for incompatibilities);  your suggestions.
  41.  
  42. ____ Legalese ____
  43. It was USENET's idea*, and my time, so it's Public Domain, for now.  I did this in a day, so there's no charge, but if it gets any bigger, I might consider charging a small fee ("All rights reserved").  If I catch any PD "distributors" charging for it, or any one else charging for it, I'll be mad and might do something nasty.  Oh yea, and you better not use my code in your version of this tool ("©1991 Mark Valence").
  44.  
  45. * actually, someone posted the idea.  I'd like to give him or her credit, but I have lost the appropriate article (and hence the name).  If the aforementioned wants to be aforementioned by name, send e-mail, and I'll do something about it.
  46.